package com.sundi.ecgoods.web;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.sundi.ecgoods.vo.ResultEntity;
import com.sundi.ecgoods.entity.EcBrand;
import com.sundi.ecgoods.service.IEcBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 品牌商表 前端控制器
 * </p>
 *
 * @author jgn
 * @since 2020-02-25
 */
@RestController
@RequestMapping("/brand")
public class BrandController {
    @Autowired
    IEcBrandService brandService;

    @RequestMapping("list")
    public ResultEntity list(){
        Wrapper<EcBrand> wrapper = new EntityWrapper<>();
        List<EcBrand> brands = brandService.selectList(wrapper);
        return ResultEntity.ok(brands);
    }
}
